package com.jiuqi.muchmore.clothing.utils;

import android.widget.CheckBox;

public class CheckBoxGroupUtil {

	public static void checkOne(CheckBox[] cbs, boolean[] authFlags, int index) {
		if (cbs != null && index >= 0 && index < cbs.length) {
			for (int i = 0; i < cbs.length; i++) {
				if (i == index) {
					cbs[i].setChecked(true);
					cbs[i].setClickable(false);
				} else if (authFlags[i]) {
					cbs[i].setChecked(false);
					cbs[i].setClickable(true);
				}
			}
		}
	}
}
